package com.pig4cloud.pigx.system.mapstruct;

import com.pig4cloud.pigx.system.dto.ArticleInformationDTO;
import com.pig4cloud.pigx.system.entity.ArticleInformation;
import com.pig4cloud.pigx.system.vo.ArticleInformationVO;
import com.pig4cloud.pigx.system.vo.EmailInformationVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Description: 文章信息
 * @Date: 2022/9/27 16:20
 */
@Mapper
public interface ArticleInformationStruct {
	ArticleInformationStruct INSTANCE = Mappers.getMapper(ArticleInformationStruct.class);

	/** DTO转文章信息 */
	ArticleInformation dto2ArticleInformation (ArticleInformationDTO articleInformationDTO);

	/** 文章信息转VO */
	ArticleInformationVO articleInformation2VO (ArticleInformation articleInformation);

	/** 文章信息转邮件信息 */
	EmailInformationVO articleInformation2EmailInformationVO(ArticleInformation articleInformation);
	/** 文章信息转邮件信息 */
	List<EmailInformationVO> articleInformationList2EmailInformationVOList(List<ArticleInformation> articleInformationList);

}
